import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Home from "../views/Home";
import Test1 from "../views/Test1";
import Test2 from "../views/Test2";
import BasicList from "../components/label/BasicList";
import OperationList from "../components/label/OperationList";
import Symptom from "../components/label/Symptom";
import AddLabel from "../components/label/Add";
import EditLabel from "../components/label/Edit";
import PatientList from "../components/patient/PatientList"
import AddPatient from "../components/patient/AddPatient"
import EditPatient from "../components/patient/EditPatient"
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login,
    hidden:true
  },
  {
    path: '/home',
    name: '查看标签',
    component: Home,
    children:[

      {
        path:'/label/basicInfo',
        name:'基本信息标签',
        component: BasicList
      },
      {
        path:'/label/operationInfo',
        name:'业务信息标签',
        component: OperationList
      },
      {
        path:'/label/symptom',
        name:'症状信息标签',
        component: Symptom
      },
    ]
  },
  {
    path: '/home',
    name: '管理标签',
    component: Home,
    children:[
      {
        path: '/label/add',
        name: '添加标签',
        component: AddLabel
      },
      {
        path: '/label/edit',
        name: '修改标签',
        component: EditLabel,
        hidden:true
      },
      // {
      //   path: '/test2',
      //   name: '选项2',
      //   component: Test2
      // }
    ]
  },
  {
    path: '/home',
    name: '病人管理',
    component: Home,
    children:[
      {
        path: '/patient',
        name: '查看病人信息',
        component: PatientList
      },
      {
        path: '/patient/add',
        name: '添加病人信息',
        component: AddPatient
      },
      {
        path: '/patient/edit',
        name: '添加病人信息',
        component: EditPatient,
        hidden:true
      },

    ]
  },
  // {
  //   path: '/home',
  //   name: '导航四',
  //   component: Home,
  //   children:[
  //     {
  //       path: '/test1',
  //       name: '选项1',
  //       component: Test1
  //     },
  //     {
  //       path: '/test2',
  //       name: '选项2',
  //       component: Test2
  //     }
  //   ]
  // }

]

const router = new VueRouter({
  routes
})

export default router
